<?php
namespace app\admin\model\shopro\third;

use app\admin\model\shopro\Common;


class Patient extends Common
{

    // 表名
    protected $name = 'shopro_third_patients';
    
    protected $type = [
    ];

    // 追加属性
    protected $append = [
        'sex_text'
    ];
    

    
    public function getSexList()
    {
        return ['1' => '男', '2' => '女'];
    }


    public function getSexTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
        $list = $this->getSexList();
        return isset($list[$value]) ? $list[$value] : '';
    }




}
